FROM opensuse/tumbleweed
WORKDIR /

RUN zypper ref && zypper in -y gcc-c++ cmake git fmt-devel
RUN git clone https://github.com/oatpp/oatpp.git
RUN git clone https://github.com/oatpp/oatpp-websocket.git
RUN git clone https://github.com/lz4/lz4.git
RUN git clone https://gitee.com/tootDebug/CameraCollege.git
RUN cd oatpp && mkdir build && cd build && cmake .. && make -j8 && make install && cd ../.. && rm -rf oatpp
RUN cd oatpp-websocket && mkdir build && cd build && cmake .. && make -j8 && make install && cd ../.. && rm -rf oatpp-websocket
RUN cd lz4/build/cmake && cmake . && make && make install && cd /  && rm -rf lz4
#ADD ../CameraCollege /CameraCollege
RUN mkdir /etc/CameraCollege && mkdir /Record
RUN cd CameraCollege && mkdir build && cd build && cmake ../tool/RemoteClient/  -DCMAKE_BUILD_TYPE=Release && make

VOLUME ["/etc/CameraCollege","/Record"]
CMD /CameraCollege/build/RemoteClient
